{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 用户和活动关联关系处理\n",
    "\n",
    "\n",
    "整个数据集中活动数目（events.csv）太多，所以下面的处理我们找出只在训练集和测试集中出现的活动和用户集合，并对他们重新编制索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "#保存数据\n",
    "import pickle\n",
    "\n",
    "import itertools\n",
    "\n",
    "#处理事件字符串\n",
    "import datetime\n",
    "\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import scipy.io as sio\n",
    "import scipy.sparse as ss\n",
    "\n",
    "#相似度/距离\n",
    "import scipy.spatial.distance as ssd\n",
    "\n",
    "from collections import defaultdict\n",
    "from sklearn.preprocessing import normalize"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "number of uniqueUsers :3391\n",
      "number of uniqueEvents :13418\n"
     ]
    }
   ],
   "source": [
    " \"\"\"\n",
    "我们只关心train和test中出现的user和event，因此重点处理这部分关联数据\n",
    "\n",
    "train.csv 有6列：\n",
    "user：用户ID\n",
    "event：活动ID\n",
    "invited：是否被邀请（0/1）\n",
    "timestamp：ISO-8601 UTC格式时间字符串，表示用户看到该活动的时间\n",
    "interested, and not_interested\n",
    "\n",
    "Test.csv 除了没有interested, and not_interested，其余列与train相同\n",
    " \"\"\"\n",
    "    \n",
    "# 统计训练集中有多少不同的用户的events\n",
    "uniqueUsers = set()\n",
    "uniqueEvents = set()\n",
    "\n",
    "#倒排表\n",
    "#统计每个用户参加的活动   / 每个活动参加的用户\n",
    "eventsForUser = defaultdict(set)\n",
    "usersForEvent = defaultdict(set)\n",
    "    \n",
    "for filename in [\"train.csv\", \"test.csv\"]:\n",
    "    f = open(filename, 'rb')\n",
    "    \n",
    "    #忽略第一行（列名字）\n",
    "    f.readline().strip().split(\",\".encode(encoding=\"utf-8\"))\n",
    "    \n",
    "    for line in f:    #对每条记录\n",
    "        cols = line.strip().split(\",\".encode(encoding=\"utf-8\"))\n",
    "        uniqueUsers.add(cols[0])   #第一列为用户ID\n",
    "        uniqueEvents.add(cols[1])   #第二列为活动ID\n",
    "        \n",
    "        #eventsForUser[cols[0]].add(cols[1])    #该用户参加了这个活动\n",
    "        #usersForEvent[cols[1]].add(cols[0])    #该活动被用户参加\n",
    "    f.close()\n",
    "\n",
    "\n",
    "n_uniqueUsers = len(uniqueUsers)\n",
    "n_uniqueEvents = len(uniqueEvents)\n",
    "\n",
    "print(\"number of uniqueUsers :%d\" % n_uniqueUsers)\n",
    "print(\"number of uniqueEvents :%d\" % n_uniqueEvents)\n",
    "\n",
    "#用户关系矩阵表，可用于后续LFM/SVD++处理的输入\n",
    "#这是一个稀疏矩阵，记录用户对活动感兴趣\n",
    "userEventScores = ss.dok_matrix((n_uniqueUsers, n_uniqueEvents))\n",
    "userIndex = dict()\n",
    "eventIndex = dict()\n",
    "\n",
    "#重新编码用户索引字典\n",
    "for i, u in enumerate(uniqueUsers):\n",
    "    userIndex[u] = i\n",
    "    \n",
    "#重新编码活动索引字典    \n",
    "for i, e in enumerate(uniqueEvents):\n",
    "    eventIndex[e] = i\n",
    "\n",
    "n_records = 0\n",
    "ftrain = open(\"train.csv\", 'rb')\n",
    "ftrain.readline()\n",
    "for line in ftrain:\n",
    "    cols = line.strip().split(\",\".encode(encoding=\"utf-8\"))\n",
    "    i = userIndex[cols[0]]  #用户\n",
    "    j = eventIndex[cols[1]] #活动\n",
    "    \n",
    "    eventsForUser[i].add(j)    #该用户参加了这个活动\n",
    "    usersForEvent[j].add(i)    #该活动被用户参加\n",
    "        \n",
    "    #userEventScores[i, j] = int(cols[4]) - int(cols[5])   #interested - not_interested\n",
    "    score = int(cols[4])\n",
    "    #if score == 0:  #0在稀疏矩阵中表示该元素不存在，因此借用-1表示interested=0\n",
    "    #userEventScores[i, j] = -1\n",
    "    #else:\n",
    "    userEventScores[i, j] = score\n",
    "ftrain.close()\n",
    "\n",
    "  \n",
    "##统计每个用户参加的活动，后续用于将用户朋友参加的活动影响到用户\n",
    "pickle.dump(eventsForUser, open(\"PE_eventsForUser.pkl\", 'wb'))\n",
    "##统计活动参加的用户\n",
    "pickle.dump(usersForEvent, open(\"PE_usersForEvent.pkl\", 'wb'))\n",
    "\n",
    "#保存用户-活动关系矩阵R，以备后用\n",
    "sio.mmwrite(\"PE_userEventScores\", userEventScores)\n",
    "\n",
    "\n",
    "#保存用户索引表\n",
    "pickle.dump(userIndex, open(\"PE_userIndex.pkl\", 'wb'))\n",
    "#保存活动索引表\n",
    "pickle.dump(eventIndex, open(\"PE_eventIndex.pkl\", 'wb'))\n",
    "\n",
    "    \n",
    "# 为了防止不必要的计算，我们找出来所有关联的用户 或者 关联的event\n",
    "# 所谓的关联用户，指的是至少在同一个event上有行为的用户pair\n",
    "# 关联的event指的是至少同一个user有行为的event pair\n",
    "uniqueUserPairs = set()\n",
    "uniqueEventPairs = set()\n",
    "for event in uniqueEvents:\n",
    "    i = eventIndex[event]\n",
    "    users = usersForEvent[i]\n",
    "    if len(users) > 2:\n",
    "        uniqueUserPairs.update(itertools.combinations(users, 2))\n",
    "        \n",
    "for user in uniqueUsers:\n",
    "    u = userIndex[user]\n",
    "    events = eventsForUser[u]\n",
    "    if len(events) > 2:\n",
    "        uniqueEventPairs.update(itertools.combinations(events, 2))\n",
    " \n",
    "#保存用户-事件关系对索引表\n",
    "pickle.dump(uniqueUserPairs, open(\"FE_uniqueUserPairs.pkl\", 'wb'))\n",
    "pickle.dump(uniqueEventPairs, open(\"PE_uniqueEventPairs.pkl\", 'wb'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "#训练集和测试集中出现的用户数目和事件数目远小于users.csv出现的用户数和events.csv出现的事件数\n",
    "users=pickle.load(open(\"FE_uniqueUserPairs.pkl\", 'rb'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{(600, 1001),\n",
       " (2640, 1862),\n",
       " (745, 2304),\n",
       " (197, 1097),\n",
       " (1924, 1482),\n",
       " (785, 1349),\n",
       " (93, 1128),\n",
       " (2379, 414),\n",
       " (3174, 1259),\n",
       " (1838, 868),\n",
       " (866, 2524),\n",
       " (3234, 1716),\n",
       " (60, 1187),\n",
       " (1940, 2528),\n",
       " (600, 1348),\n",
       " (1151, 1265),\n",
       " (1156, 2487),\n",
       " (1248, 2608),\n",
       " (141, 1458),\n",
       " (1026, 652),\n",
       " (2577, 95),\n",
       " (2072, 929),\n",
       " (1268, 335),\n",
       " (1729, 1995),\n",
       " (1109, 717),\n",
       " (1159, 2196),\n",
       " (1388, 1396),\n",
       " (2289, 2854),\n",
       " (2797, 2425),\n",
       " (2892, 935),\n",
       " (1109, 2402),\n",
       " (735, 495),\n",
       " (2828, 2899),\n",
       " (1821, 352),\n",
       " (539, 656),\n",
       " (378, 2948),\n",
       " (251, 2558),\n",
       " (670, 350),\n",
       " (559, 1449),\n",
       " (1592, 1452),\n",
       " (2299, 1829),\n",
       " (2124, 988),\n",
       " (2396, 921),\n",
       " (1461, 113),\n",
       " (3099, 28),\n",
       " (1251, 1925),\n",
       " (2163, 958),\n",
       " (1154, 1691),\n",
       " (158, 1650),\n",
       " (1078, 1750),\n",
       " (566, 3066),\n",
       " (2181, 1460),\n",
       " (932, 1452),\n",
       " (992, 3231),\n",
       " (1679, 868),\n",
       " (2439, 124),\n",
       " (2248, 2363),\n",
       " (1538, 1444),\n",
       " (3389, 2800),\n",
       " (51, 200),\n",
       " (1194, 1962),\n",
       " (113, 263),\n",
       " (680, 1324),\n",
       " (521, 2024),\n",
       " (1821, 2399),\n",
       " (1127, 1016),\n",
       " (2076, 969),\n",
       " (41, 1750),\n",
       " (819, 2363),\n",
       " (2289, 2402),\n",
       " (1097, 3261),\n",
       " (2408, 1929),\n",
       " (2673, 899),\n",
       " (3328, 1388),\n",
       " (1120, 778),\n",
       " (717, 1448),\n",
       " (1750, 2854),\n",
       " (1660, 2976),\n",
       " (2210, 439),\n",
       " (2076, 1452),\n",
       " (387, 91),\n",
       " (1214, 2360),\n",
       " (1754, 249),\n",
       " (961, 866),\n",
       " (2996, 1645),\n",
       " (686, 1393),\n",
       " (1592, 2024),\n",
       " (1828, 832),\n",
       " (1594, 2234),\n",
       " (31, 1348),\n",
       " (245, 3355),\n",
       " (2899, 2906),\n",
       " (2701, 3332),\n",
       " (1691, 2028),\n",
       " (2271, 2959),\n",
       " (790, 335),\n",
       " (2379, 3069),\n",
       " (3083, 895),\n",
       " (2137, 2834),\n",
       " (2825, 579),\n",
       " (317, 887),\n",
       " (635, 1764),\n",
       " (1628, 2669),\n",
       " (414, 1587),\n",
       " (1135, 1715),\n",
       " (3212, 1532),\n",
       " (1396, 1521),\n",
       " (2907, 2719),\n",
       " (2379, 1382),\n",
       " (2146, 3175),\n",
       " (1403, 1431),\n",
       " (37, 2116),\n",
       " (2164, 2284),\n",
       " (2591, 317),\n",
       " (414, 2478),\n",
       " (822, 2363),\n",
       " (690, 66),\n",
       " (1775, 2911),\n",
       " (111, 1532),\n",
       " (3232, 1393),\n",
       " (1750, 839),\n",
       " (685, 317),\n",
       " (740, 824),\n",
       " (2743, 2939),\n",
       " (1428, 3023),\n",
       " (2835, 372),\n",
       " (159, 1962),\n",
       " (929, 1119),\n",
       " (1295, 2412),\n",
       " (717, 2028),\n",
       " (3123, 969),\n",
       " (2145, 1174),\n",
       " (2823, 495),\n",
       " (3229, 348),\n",
       " (2216, 2892),\n",
       " (292, 2533),\n",
       " (2735, 1251),\n",
       " (51, 3066),\n",
       " (3201, 827),\n",
       " (553, 1883),\n",
       " (3206, 2304),\n",
       " (1311, 1754),\n",
       " (1247, 1324),\n",
       " (2945, 1637),\n",
       " (2444, 2916),\n",
       " (1599, 951),\n",
       " (2076, 2299),\n",
       " (3072, 3044),\n",
       " (387, 1264),\n",
       " (1050, 2640),\n",
       " (1267, 1206),\n",
       " (2186, 579),\n",
       " (1693, 2810),\n",
       " (1592, 703),\n",
       " (1247, 2945),\n",
       " (2995, 1471),\n",
       " (1281, 1016),\n",
       " (2285, 503),\n",
       " (1151, 2408),\n",
       " (2140, 3314),\n",
       " (2260, 2559),\n",
       " (903, 1805),\n",
       " (439, 840),\n",
       " (1128, 2047),\n",
       " (1716, 736),\n",
       " (2725, 399),\n",
       " (2783, 3053),\n",
       " (1538, 2604),\n",
       " (1259, 3003),\n",
       " (249, 2850),\n",
       " (2930, 895),\n",
       " (3135, 116),\n",
       " (1799, 683),\n",
       " (521, 1120),\n",
       " (1441, 2999),\n",
       " (1561, 338),\n",
       " (1706, 1901),\n",
       " (2826, 3257),\n",
       " (2, 567),\n",
       " (534, 2098),\n",
       " (2830, 1013),\n",
       " (1722, 839),\n",
       " (1830, 3386),\n",
       " (2193, 1860),\n",
       " (2145, 1023),\n",
       " (521, 2234),\n",
       " (539, 929),\n",
       " (1973, 630),\n",
       " (617, 245),\n",
       " (3224, 3227),\n",
       " (1978, 2880),\n",
       " (1756, 106),\n",
       " (1154, 1962),\n",
       " (2862, 2145),\n",
       " (795, 2980),\n",
       " (3119, 2674),\n",
       " (1461, 2535),\n",
       " (1265, 2350),\n",
       " (3332, 2945),\n",
       " (1458, 1396),\n",
       " (2783, 1441),\n",
       " (2171, 2304),\n",
       " (634, 3064),\n",
       " (785, 1458),\n",
       " (656, 3090),\n",
       " (1401, 3038),\n",
       " (2695, 1775),\n",
       " (1128, 790),\n",
       " (420, 3151),\n",
       " (1474, 318),\n",
       " (2127, 2805),\n",
       " (3284, 3326),\n",
       " (3167, 251),\n",
       " (2637, 860),\n",
       " (268, 991),\n",
       " (1595, 2270),\n",
       " (1706, 1441),\n",
       " (1674, 407),\n",
       " (1128, 2289),\n",
       " (680, 1115),\n",
       " (3358, 3320),\n",
       " (3215, 529),\n",
       " (766, 2939),\n",
       " (1593, 285),\n",
       " (51, 2162),\n",
       " (3201, 1187),\n",
       " (1078, 2171),\n",
       " (1750, 2289),\n",
       " (39, 3053),\n",
       " (3326, 2551),\n",
       " (1505, 1425),\n",
       " (1452, 632),\n",
       " (1198, 1900),\n",
       " (1894, 2553),\n",
       " (1120, 3044),\n",
       " (322, 335),\n",
       " (483, 2183),\n",
       " (1594, 2445),\n",
       " (2989, 2389),\n",
       " (996, 3147),\n",
       " (660, 2999),\n",
       " (105, 3266),\n",
       " (2815, 819),\n",
       " (31, 750),\n",
       " (3096, 3237),\n",
       " (835, 2379),\n",
       " (2260, 2826),\n",
       " (2252, 1247),\n",
       " (575, 3053),\n",
       " (1068, 1599),\n",
       " (1637, 2234),\n",
       " (1626, 113),\n",
       " (717, 2835),\n",
       " (1949, 450),\n",
       " (1458, 479),\n",
       " (2079, 414),\n",
       " (1924, 2516),\n",
       " (2478, 617),\n",
       " (713, 1644),\n",
       " (662, 567),\n",
       " (2164, 790),\n",
       " (3003, 2030),\n",
       " (680, 1431),\n",
       " (237, 2478),\n",
       " (899, 2999),\n",
       " (3083, 3234),\n",
       " (745, 899),\n",
       " (1879, 1014),\n",
       " (3386, 969),\n",
       " (2708, 317),\n",
       " (1118, 348),\n",
       " (2360, 419),\n",
       " (3261, 1431),\n",
       " (641, 840),\n",
       " (695, 3053),\n",
       " (2408, 495),\n",
       " (1833, 2215),\n",
       " (90, 2735),\n",
       " (2959, 492),\n",
       " (2389, 1396),\n",
       " (1366, 2146),\n",
       " (635, 2516),\n",
       " (827, 978),\n",
       " (3023, 1013),\n",
       " (2933, 887),\n",
       " (2714, 1661),\n",
       " (575, 780),\n",
       " (3224, 2542),\n",
       " (2707, 492),\n",
       " (1165, 1650),\n",
       " (1940, 840),\n",
       " (107, 440),\n",
       " (1691, 450),\n",
       " (951, 333),\n",
       " (3357, 378),\n",
       " (882, 2046),\n",
       " (1825, 2868),\n",
       " (575, 1441),\n",
       " (2363, 1014),\n",
       " (1255, 259),\n",
       " (2352, 1329),\n",
       " (105, 2171),\n",
       " (2707, 1929),\n",
       " (1428, 1343),\n",
       " (2835, 1636),\n",
       " (2535, 3064),\n",
       " (2210, 2155),\n",
       " (111, 641),\n",
       " (809, 2289),\n",
       " (676, 2783),\n",
       " (90, 652),\n",
       " (1118, 1944),\n",
       " (2507, 2436),\n",
       " (1599, 2695),\n",
       " (1876, 3064),\n",
       " (1431, 2289),\n",
       " (3212, 2797),\n",
       " (1026, 2933),\n",
       " (589, 3310),\n",
       " (3227, 2412),\n",
       " (617, 1481),\n",
       " (1374, 1949),\n",
       " (2299, 2854),\n",
       " (3131, 2823),\n",
       " (60, 2959),\n",
       " (539, 3326),\n",
       " (827, 414),\n",
       " (1457, 1879),\n",
       " (1767, 2678),\n",
       " (2350, 617),\n",
       " (1650, 1428),\n",
       " (2196, 2939),\n",
       " (2098, 1834),\n",
       " (1544, 1401),\n",
       " (3037, 1521),\n",
       " (1281, 885),\n",
       " (2783, 253),\n",
       " (2248, 899),\n",
       " (2862, 2352),\n",
       " (1154, 253),\n",
       " (146, 1208),\n",
       " (2695, 827),\n",
       " (607, 947),\n",
       " (2331, 76),\n",
       " (2649, 249),\n",
       " (1308, 1398),\n",
       " (1544, 3220),\n",
       " (3131, 1101),\n",
       " (457, 2825),\n",
       " (2577, 1944),\n",
       " (1594, 1599),\n",
       " (1101, 2289),\n",
       " (1128, 1130),\n",
       " (215, 122),\n",
       " (1151, 822),\n",
       " (1725, 739),\n",
       " (2674, 1692),\n",
       " (2215, 1750),\n",
       " (1329, 2542),\n",
       " (1605, 93),\n",
       " (1674, 1187),\n",
       " (113, 3332),\n",
       " (2895, 1168),\n",
       " (102, 1444),\n",
       " (83, 1756),\n",
       " (1042, 3257),\n",
       " (1150, 2350),\n",
       " (2708, 1461),\n",
       " (64, 2580),\n",
       " (3240, 2987),\n",
       " (1128, 2976),\n",
       " (116, 3252),\n",
       " (2939, 1453),\n",
       " (1694, 1457),\n",
       " (1876, 2492),\n",
       " (46, 1135),\n",
       " (742, 1016),\n",
       " (1556, 1766),\n",
       " (1097, 735),\n",
       " (3227, 2216),\n",
       " (2299, 2402),\n",
       " (786, 606),\n",
       " (1602, 868),\n",
       " (200, 495),\n",
       " (904, 2233),\n",
       " (2216, 1902),\n",
       " (1325, 951),\n",
       " (59, 1460),\n",
       " (2234, 3323),\n",
       " (924, 1008),\n",
       " (617, 354),\n",
       " (1115, 495),\n",
       " (3330, 2047),\n",
       " (1311, 740),\n",
       " (1096, 2933),\n",
       " (253, 1834),\n",
       " (765, 3038),\n",
       " (2177, 1713),\n",
       " (790, 1001),\n",
       " (1788, 974),\n",
       " (1875, 2285),\n",
       " (1078, 1660),\n",
       " (2140, 2284),\n",
       " (3279, 2149),\n",
       " (2564, 2718),\n",
       " (1458, 1259),\n",
       " (1246, 1830),\n",
       " (909, 1185),\n",
       " (331, 2417),\n",
       " (2181, 1258),\n",
       " (2125, 1944),\n",
       " (111, 505),\n",
       " (2649, 1810),\n",
       " (2183, 780),\n",
       " (690, 1764),\n",
       " (1702, 1525),\n",
       " (2833, 479),\n",
       " (780, 1894),\n",
       " (1829, 1901),\n",
       " (3135, 1110),\n",
       " (600, 1626),\n",
       " (3096, 1231),\n",
       " (1248, 1222),\n",
       " (2948, 952),\n",
       " (1626, 2535),\n",
       " (113, 237),\n",
       " (717, 1001),\n",
       " (3358, 3175),\n",
       " (740, 350),\n",
       " (2946, 2685),\n",
       " (1258, 2379),\n",
       " (3229, 958),\n",
       " (18, 952),\n",
       " (3307, 246),\n",
       " (1325, 1403),\n",
       " (832, 492),\n",
       " (2708, 2215),\n",
       " (2959, 1725),\n",
       " (2911, 3064),\n",
       " (514, 2412),\n",
       " (1120, 1151),\n",
       " (248, 2999),\n",
       " (105, 978),\n",
       " (1210, 1265),\n",
       " (2564, 895),\n",
       " (1971, 3070),\n",
       " (22, 899),\n",
       " (2297, 1162),\n",
       " (1594, 951),\n",
       " (2815, 932),\n",
       " (1628, 2871),\n",
       " (1228, 3053),\n",
       " (1119, 1008),\n",
       " (529, 477),\n",
       " (278, 2948),\n",
       " (1329, 1398),\n",
       " (3287, 1818),\n",
       " (7, 1174),\n",
       " (1119, 2389),\n",
       " (1810, 2987),\n",
       " (2740, 3355),\n",
       " (2289, 495),\n",
       " (141, 96),\n",
       " (111, 1366),\n",
       " (2649, 2987),\n",
       " (2948, 1532),\n",
       " (2164, 921),\n",
       " (794, 2478),\n",
       " (2916, 860),\n",
       " (2930, 2948),\n",
       " (3201, 1764),\n",
       " (1833, 951),\n",
       " (2553, 3066),\n",
       " (567, 579),\n",
       " (3261, 1324),\n",
       " (3328, 1650),\n",
       " (685, 2248),\n",
       " (1599, 2164),\n",
       " (2076, 1722),\n",
       " (1879, 1452),\n",
       " (2708, 2779),\n",
       " (1545, 3212),\n",
       " (2911, 2492),\n",
       " (3224, 158),\n",
       " (559, 2299),\n",
       " (2906, 249),\n",
       " (1925, 1732),\n",
       " (1599, 745),\n",
       " (41, 3330),\n",
       " (534, 251),\n",
       " (3215, 2196),\n",
       " (2880, 3320),\n",
       " (795, 1977),\n",
       " (2181, 2701),\n",
       " (2260, 958),\n",
       " (1825, 548),\n",
       " (3224, 2425),\n",
       " (1096, 1128),\n",
       " (1228, 1457),\n",
       " (1165, 1767),\n",
       " (780, 2379),\n",
       " (28, 2528),\n",
       " (785, 439),\n",
       " (3279, 3357),\n",
       " (1050, 333),\n",
       " (600, 2167),\n",
       " (1605, 1833),\n",
       " (2164, 3066),\n",
       " (1265, 2888),\n",
       " (1331, 348),\n",
       " (1628, 1246),\n",
       " (2248, 3053),\n",
       " (2296, 1374),\n",
       " (3332, 2535),\n",
       " (1222, 2411),\n",
       " (2162, 315),\n",
       " (2146, 1940),\n",
       " (2215, 263),\n",
       " (958, 3037),\n",
       " (521, 1246),\n",
       " (1481, 3044),\n",
       " (2838, 2539),\n",
       " (2703, 2862),\n",
       " (2885, 2999),\n",
       " (3227, 924),\n",
       " (2503, 8),\n",
       " (1978, 1900),\n",
       " (733, 827),\n",
       " (1252, 1309),\n",
       " (3123, 735),\n",
       " (2, 733),\n",
       " (1856, 956),\n",
       " (1694, 1120),\n",
       " (2624, 3247),\n",
       " (1551, 665),\n",
       " (1042, 1231),\n",
       " (2909, 3038),\n",
       " (85, 796),\n",
       " (2825, 2196),\n",
       " (641, 1902),\n",
       " (1109, 2825),\n",
       " (3358, 1329),\n",
       " (3323, 932),\n",
       " (1251, 819),\n",
       " (1971, 1910),\n",
       " (1348, 159),\n",
       " (1756, 780),\n",
       " (1247, 2815),\n",
       " (3168, 695),\n",
       " (1544, 1508),\n",
       " (1120, 2306),\n",
       " (2577, 3240),\n",
       " (3096, 2216),\n",
       " (350, 3023),\n",
       " (1251, 1452),\n",
       " (3212, 1838),\n",
       " (3198, 899),\n",
       " (1068, 2618),\n",
       " (3, 842),\n",
       " (333, 495),\n",
       " (2125, 2724),\n",
       " (1371, 2227),\n",
       " (794, 579),\n",
       " (1594, 322),\n",
       " (354, 766),\n",
       " (3135, 354),\n",
       " (51, 1110),\n",
       " (2363, 2024),\n",
       " (842, 887),\n",
       " (2400, 740),\n",
       " (1626, 1747),\n",
       " (1347, 1006),\n",
       " (39, 1929),\n",
       " (2669, 1804),\n",
       " (766, 3386),\n",
       " (1810, 1174),\n",
       " (2445, 2478),\n",
       " (1595, 2360),\n",
       " (1674, 333),\n",
       " (3176, 480),\n",
       " (2487, 331),\n",
       " (1118, 1347),\n",
       " (1729, 2030),\n",
       " (1838, 1508),\n",
       " (129, 529),\n",
       " (1973, 3094),\n",
       " (539, 1066),\n",
       " (3175, 3038),\n",
       " (147, 2520),\n",
       " (3201, 1481),\n",
       " (1545, 2308),\n",
       " (784, 3247),\n",
       " (617, 2162),\n",
       " (90, 1706),\n",
       " (1118, 958),\n",
       " (643, 868),\n",
       " (2383, 3055),\n",
       " (2976, 2999),\n",
       " (3323, 480),\n",
       " (3072, 1078),\n",
       " (988, 2815),\n",
       " (2880, 2400),\n",
       " (2885, 197),\n",
       " (617, 495),\n",
       " (765, 2899),\n",
       " (2098, 2533),\n",
       " (3237, 2412),\n",
       " (2137, 2425),\n",
       " (2052, 1754),\n",
       " (315, 1348),\n",
       " (492, 2673),\n",
       " (635, 159),\n",
       " (1096, 1691),\n",
       " (766, 1371),\n",
       " (2213, 553),\n",
       " (2310, 381),\n",
       " (113, 3069),\n",
       " (519, 1691),\n",
       " (2248, 2304),\n",
       " (2577, 958),\n",
       " (192, 824),\n",
       " (2368, 3013),\n",
       " (1128, 2535),\n",
       " (3229, 1198),\n",
       " (3234, 1016),\n",
       " (1602, 3032),\n",
       " (2987, 3279),\n",
       " (2616, 1471),\n",
       " (3151, 2385),\n",
       " (652, 2959),\n",
       " (1187, 3330),\n",
       " (1611, 2826),\n",
       " (641, 1174),\n",
       " (2797, 3032),\n",
       " (200, 1110),\n",
       " (685, 2553),\n",
       " (1599, 1829),\n",
       " (2163, 2948),\n",
       " (695, 2871),\n",
       " (1214, 2333),\n",
       " (2436, 690),\n",
       " (2835, 2360),\n",
       " (1907, 3032),\n",
       " (2911, 2669),\n",
       " (2299, 1348),\n",
       " (3364, 2518),\n",
       " (1594, 2215),\n",
       " (250, 1936),\n",
       " (1228, 253),\n",
       " (3355, 1001),\n",
       " (3360, 3261),\n",
       " (1551, 2895),\n",
       " (714, 887),\n",
       " (1656, 2516),\n",
       " (3235, 111),\n",
       " (124, 2980),\n",
       " (1371, 3131),\n",
       " (1096, 1879),\n",
       " (2444, 928),\n",
       " (1636, 1637),\n",
       " (2478, 3044),\n",
       " (3096, 3003),\n",
       " (3013, 2193),\n",
       " (197, 492),\n",
       " (2564, 1349),\n",
       " (1894, 1461),\n",
       " (2186, 2959),\n",
       " (1787, 1835),\n",
       " (529, 2999),\n",
       " (3096, 278),\n",
       " (2669, 1172),\n",
       " (634, 1901),\n",
       " (822, 2396),\n",
       " (895, 3279),\n",
       " (2210, 2481),\n",
       " (2146, 1767),\n",
       " (844, 980),\n",
       " (3229, 2834),\n",
       " (18, 2828),\n",
       " (39, 1210),\n",
       " (1259, 1023),\n",
       " (2838, 2874),\n",
       " (51, 3332),\n",
       " (2213, 2343),\n",
       " (3201, 2417),\n",
       " (514, 192),\n",
       " (2604, 868),\n",
       " (3066, 2379),\n",
       " (1655, 885),\n",
       " (1030, 1272),\n",
       " (1599, 2553),\n",
       " (2528, 895),\n",
       " (695, 3323),\n",
       " (2210, 1787),\n",
       " (1883, 1910),\n",
       " (1973, 2040),\n",
       " (839, 1460),\n",
       " (942, 2428),\n",
       " (248, 2558),\n",
       " (3240, 868),\n",
       " (1594, 2779),\n",
       " (735, 1255),\n",
       " (695, 1628),\n",
       " (827, 248),\n",
       " (2234, 2333),\n",
       " (1656, 2960),\n",
       " (124, 2408),\n",
       " (1210, 2271),\n",
       " (3053, 124),\n",
       " (1594, 3198),\n",
       " (780, 2558),\n",
       " (822, 317),\n",
       " (59, 2815),\n",
       " (2308, 95),\n",
       " (2350, 2402),\n",
       " (660, 1828),\n",
       " (3, 635),\n",
       " (1128, 1924),\n",
       " (1605, 1694),\n",
       " (1255, 41),\n",
       " (1742, 2417),\n",
       " (796, 1444),\n",
       " (107, 2827),\n",
       " (1259, 3038),\n",
       " (1343, 2542),\n",
       " (739, 2794),\n",
       " (2146, 1835),\n",
       " (1419, 2518),\n",
       " (1268, 2976),\n",
       " (259, 3198),\n",
       " (611, 1407),\n",
       " (2145, 3240),\n",
       " (1132, 1995),\n",
       " (713, 2815),\n",
       " (824, 2412),\n",
       " (1150, 2436),\n",
       " (1118, 1650),\n",
       " (2365, 2960),\n",
       " (18, 1975),\n",
       " (1127, 192),\n",
       " (3175, 2703),\n",
       " (178, 2713),\n",
       " (3082, 3175),\n",
       " (652, 1722),\n",
       " (1078, 2640),\n",
       " (39, 2436),\n",
       " (595, 3096),\n",
       " (1599, 1110),\n",
       " (534, 690),\n",
       " (3083, 1754),\n",
       " (387, 1363),\n",
       " (1754, 1521),\n",
       " (1788, 1421),\n",
       " (2149, 1174),\n",
       " (1962, 2518),\n",
       " (1901, 1962),\n",
       " (3147, 1747),\n",
       " (3390, 1645),\n",
       " (1228, 2024),\n",
       " (31, 1628),\n",
       " (2783, 1003),\n",
       " (2076, 3135),\n",
       " (102, 2948),\n",
       " (2735, 2360),\n",
       " (2825, 1883),\n",
       " (273, 1180),\n",
       " (2260, 1944),\n",
       " (3366, 2355),\n",
       " (3147, 124),\n",
       " (2707, 1371),\n",
       " (600, 921),\n",
       " (1119, 1366),\n",
       " (3257, 2528),\n",
       " (1538, 2189),\n",
       " (2600, 1597),\n",
       " (2695, 1674),\n",
       " (1530, 2727),\n",
       " (1128, 827),\n",
       " (1660, 1830),\n",
       " (1628, 248),\n",
       " (3096, 1129),\n",
       " (1900, 885),\n",
       " (1847, 798),\n",
       " (750, 1834),\n",
       " (676, 1929),\n",
       " (1441, 2518),\n",
       " (1014, 3064),\n",
       " (3227, 85),\n",
       " (2888, 3064),\n",
       " (1602, 1259),\n",
       " (2936, 3044),\n",
       " (41, 1962),\n",
       " (840, 3038),\n",
       " (2724, 249),\n",
       " (2064, 2425),\n",
       " (3113, 2418),\n",
       " (1592, 3201),\n",
       " (1115, 2408),\n",
       " (348, 1401),\n",
       " (2976, 2882),\n",
       " (670, 2163),\n",
       " (41, 263),\n",
       " (1818, 2383),\n",
       " (2218, 3070),\n",
       " (1944, 3357),\n",
       " (2244, 326),\n",
       " (1600, 2703),\n",
       " (641, 2828),\n",
       " (1115, 245),\n",
       " (635, 2959),\n",
       " (2360, 2535),\n",
       " (2354, 2286),\n",
       " (2481, 2400),\n",
       " (1452, 3064),\n",
       " (2271, 1371),\n",
       " (22, 617),\n",
       " (3235, 348),\n",
       " (1078, 1862),\n",
       " (1149, 942),\n",
       " (2137, 3235),\n",
       " (1792, 3037),\n",
       " (59, 2304),\n",
       " (278, 2146),\n",
       " (1764, 1929),\n",
       " (1637, 2181),\n",
       " (2826, 1767),\n",
       " (2987, 3039),\n",
       " (2116, 47),\n",
       " (1132, 2899),\n",
       " (3220, 2987),\n",
       " (750, 1382),\n",
       " (1026, 1120),\n",
       " (1097, 2960),\n",
       " (840, 1023),\n",
       " (824, 1508),\n",
       " (3105, 809),\n",
       " (2164, 819),\n",
       " (1227, 253),\n",
       " (1861, 1398),\n",
       " (60, 250),\n",
       " (3326, 505),\n",
       " (3083, 3257),\n",
       " (39, 1003),\n",
       " (200, 2854),\n",
       " (1264, 2962),\n",
       " (3328, 1308),\n",
       " (2830, 1174),\n",
       " (1600, 736),\n",
       " (1295, 3032),\n",
       " (2826, 2481),\n",
       " (735, 819),\n",
       " (534, 3386),\n",
       " (1694, 450),\n",
       " (2179, 2580),\n",
       " (3215, 1365),\n",
       " (3201, 495),\n",
       " (1097, 1706),\n",
       " (2692, 2522),\n",
       " (617, 1936),\n",
       " (2666, 492),\n",
       " (2735, 1823),\n",
       " (1165, 3240),\n",
       " (158, 1118),\n",
       " (827, 969),\n",
       " (2205, 1861),\n",
       " (2769, 2705),\n",
       " (2850, 102),\n",
       " (2196, 3372),\n",
       " (598, 600),\n",
       " (335, 2402),\n",
       " (2333, 2408),\n",
       " (2079, 2436),\n",
       " (107, 479),\n",
       " (2052, 740),\n",
       " (1050, 483),\n",
       " (1564, 105),\n",
       " (1449, 1014),\n",
       " (1214, 1346),\n",
       " (2400, 1767),\n",
       " (2072, 2542),\n",
       " (1628, 1120),\n",
       " (579, 1149),\n",
       " (2669, 2825),\n",
       " (1264, 947),\n",
       " (354, 2983),\n",
       " (1403, 2976),\n",
       " (2718, 2604),\n",
       " (2826, 350),\n",
       " (680, 3064),\n",
       " (2383, 1431),\n",
       " (685, 333),\n",
       " (107, 3237),\n",
       " (717, 3287),\n",
       " (2960, 996),\n",
       " (2213, 2220),\n",
       " (2559, 2862),\n",
       " (2618, 988),\n",
       " (2180, 215),\n",
       " (2417, 2329),\n",
       " (1599, 2402),\n",
       " (3355, 2885),\n",
       " (141, 3284),\n",
       " (2835, 2945),\n",
       " (1611, 1900),\n",
       " (1348, 1374),\n",
       " (3131, 3066),\n",
       " (60, 3044),\n",
       " (1265, 1448),\n",
       " (1855, 1385),\n",
       " (96, 249),\n",
       " (1551, 1428),\n",
       " (315, 345),\n",
       " (3014, 1621),\n",
       " (1120, 2284),\n",
       " (1228, 1247),\n",
       " (2412, 1023),\n",
       " (2947, 924),\n",
       " (785, 665),\n",
       " (1804, 124),\n",
       " (439, 1016),\n",
       " (111, 2703),\n",
       " (1110, 1247),\n",
       " (2879, 2145),\n",
       " (2125, 2826),\n",
       " (2124, 3266),\n",
       " (1101, 2252),\n",
       " (158, 2412),\n",
       " (600, 680),\n",
       " (414, 3066),\n",
       " (634, 2740),\n",
       " (3114, 2794),\n",
       " (3198, 2708),\n",
       " (1838, 935),\n",
       " (2649, 2425),\n",
       " (1716, 1259),\n",
       " (1162, 2040),\n",
       " (3167, 951),\n",
       " (1428, 2547),\n",
       " (1097, 2181),\n",
       " (90, 237),\n",
       " (2911, 245),\n",
       " (1128, 2885),\n",
       " (2399, 929),\n",
       " (41, 1115),\n",
       " (2701, 887),\n",
       " (46, 1104),\n",
       " (1756, 2999),\n",
       " (839, 1645),\n",
       " (1078, 2735),\n",
       " (3008, 1799),\n",
       " (3284, 736),\n",
       " (73, 842),\n",
       " (534, 969),\n",
       " (3175, 3237),\n",
       " (1431, 3381),\n",
       " (2216, 1907),\n",
       " (1706, 2999),\n",
       " (839, 2518),\n",
       " (2098, 2379),\n",
       " (2124, 1251),\n",
       " (2234, 1403),\n",
       " (354, 392),\n",
       " (116, 735),\n",
       " (2577, 2559),\n",
       " (2079, 2673),\n",
       " (785, 1602),\n",
       " (2149, 2389),\n",
       " (3341, 2909),\n",
       " (93, 1901),\n",
       " (736, 1508),\n",
       " (2649, 1845),\n",
       " (2718, 1444),\n",
       " (314, 1862),\n",
       " (1008, 1401),\n",
       " (2116, 478),\n",
       " (2577, 868),\n",
       " (2947, 3246),\n",
       " (15, 3386),\n",
       " (46, 3185),\n",
       " (2210, 2899),\n",
       " (2618, 1876),\n",
       " (3176, 1750),\n",
       " (2164, 450),\n",
       " (18, 2542),\n",
       " (733, 1481),\n",
       " (521, 41),\n",
       " (2701, 315),\n",
       " (106, 3355),\n",
       " (1118, 656),\n",
       " (90, 1924),\n",
       " (1348, 2518),\n",
       " (124, 1984),\n",
       " (177, 1111),\n",
       " (18, 85),\n",
       " (740, 3038),\n",
       " (3044, 3069),\n",
       " (1754, 952),\n",
       " (85, 1679),\n",
       " (1833, 2939),\n",
       " (1650, 249),\n",
       " ...}"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "users"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "ename": "IndexError",
     "evalue": "tuple index out of range",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mIndexError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-42-45c44aab556e>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msavetxt\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'new.csv'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0musers\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdelimiter\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m','\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32mD:\\anaconda\\lib\\site-packages\\numpy\\lib\\npyio.py\u001b[0m in \u001b[0;36msavetxt\u001b[1;34m(fname, X, fmt, delimiter, newline, header, footer, comments)\u001b[0m\n\u001b[0;32m   1212\u001b[0m                 \u001b[0mncol\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdescr\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1213\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1214\u001b[1;33m             \u001b[0mncol\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mX\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1215\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1216\u001b[0m         \u001b[0miscomplex_X\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0miscomplexobj\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mIndexError\u001b[0m: tuple index out of range"
     ]
    }
   ],
   "source": [
    "np.savetxt('new.csv',users, delimiter = ',')  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "event=pickle.load(open(\"PE_uniqueEventPairs.pkl\", 'rb'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{(4515, 11631),\n",
       " (12329, 1435),\n",
       " (12689, 735),\n",
       " (10466, 4534),\n",
       " (8070, 12503),\n",
       " (3306, 5882),\n",
       " (3585, 5991),\n",
       " (4167, 12875),\n",
       " (8200, 2800),\n",
       " (1795, 4155),\n",
       " (8646, 11411),\n",
       " (2730, 4319),\n",
       " (1577, 1147),\n",
       " (12932, 11667),\n",
       " (9490, 879),\n",
       " (7696, 13256),\n",
       " (10689, 11057),\n",
       " (4491, 11414),\n",
       " (13068, 664),\n",
       " (2896, 2646),\n",
       " (11428, 887),\n",
       " (5130, 6965),\n",
       " (9171, 10519),\n",
       " (820, 111),\n",
       " (1792, 3522),\n",
       " (6773, 12344),\n",
       " (3601, 11411),\n",
       " (9411, 9497),\n",
       " (12558, 8880),\n",
       " (5293, 6328),\n",
       " (997, 8294),\n",
       " (8427, 2655),\n",
       " (9550, 5881),\n",
       " (1792, 10386),\n",
       " (3663, 11935),\n",
       " (8065, 8271),\n",
       " (4082, 4253),\n",
       " (3918, 5071),\n",
       " (5801, 10181),\n",
       " (6096, 6765),\n",
       " (12257, 8606),\n",
       " (10959, 6225),\n",
       " (7363, 12184),\n",
       " (3879, 10345),\n",
       " (7961, 6320),\n",
       " (11244, 11119),\n",
       " (522, 11614),\n",
       " (11720, 11490),\n",
       " (7030, 4598),\n",
       " (8686, 12062),\n",
       " (7477, 11965),\n",
       " (7609, 13337),\n",
       " (10276, 12048),\n",
       " (8664, 12154),\n",
       " (7018, 3321),\n",
       " (3849, 1822),\n",
       " (831, 12503),\n",
       " (5893, 2684),\n",
       " (9362, 7870),\n",
       " (4147, 1867),\n",
       " (5955, 3023),\n",
       " (7149, 12503),\n",
       " (11037, 4605),\n",
       " (10785, 11309),\n",
       " (10970, 4477),\n",
       " (10000, 3363),\n",
       " (2216, 875),\n",
       " (11325, 13280),\n",
       " (11338, 9977),\n",
       " (3765, 11006),\n",
       " (12164, 7451),\n",
       " (3082, 12943),\n",
       " (9281, 5672),\n",
       " (11347, 2262),\n",
       " (6961, 9559),\n",
       " (1159, 6667),\n",
       " (3080, 1339),\n",
       " (4619, 7794),\n",
       " (4437, 12280),\n",
       " (3528, 9550),\n",
       " (13345, 4739),\n",
       " (78, 6771),\n",
       " (12518, 8249),\n",
       " (2267, 12388),\n",
       " (6725, 11350),\n",
       " (4162, 7921),\n",
       " (11438, 6621),\n",
       " (3973, 13151),\n",
       " (12808, 11072),\n",
       " (2051, 5918),\n",
       " (6689, 8453),\n",
       " (4296, 11358),\n",
       " (1858, 1859),\n",
       " (13323, 7886),\n",
       " (4453, 3063),\n",
       " (10446, 7409),\n",
       " (3461, 394),\n",
       " (10190, 8062),\n",
       " (3985, 10279),\n",
       " (12285, 12159),\n",
       " (480, 7718),\n",
       " (9658, 2462),\n",
       " (1680, 4697),\n",
       " (10429, 6510),\n",
       " (12291, 12590),\n",
       " (6434, 8794),\n",
       " (11276, 2261),\n",
       " (905, 6412),\n",
       " (1858, 2525),\n",
       " (4651, 9745),\n",
       " (993, 8140),\n",
       " (9282, 12626),\n",
       " (12185, 3999),\n",
       " (1356, 1402),\n",
       " (13154, 552),\n",
       " (11077, 12877),\n",
       " (8904, 7220),\n",
       " (12689, 6328),\n",
       " (3877, 8623),\n",
       " (3691, 12955),\n",
       " (1367, 346),\n",
       " (9635, 1627),\n",
       " (1625, 11901),\n",
       " (4630, 12889),\n",
       " (650, 1822),\n",
       " (6285, 10616),\n",
       " (9891, 566),\n",
       " (9206, 8443),\n",
       " (12958, 4546),\n",
       " (6278, 1214),\n",
       " (5138, 9309),\n",
       " (3591, 12912),\n",
       " (6689, 11275),\n",
       " (4998, 3130),\n",
       " (7117, 1269),\n",
       " (2022, 7408),\n",
       " (3342, 5110),\n",
       " (9330, 1367),\n",
       " (6955, 10695),\n",
       " (3178, 12828),\n",
       " (2057, 6011),\n",
       " (2761, 10939),\n",
       " (10035, 740),\n",
       " (2598, 10549),\n",
       " (6181, 3419),\n",
       " (7041, 11869),\n",
       " (3649, 11064),\n",
       " (3017, 8923),\n",
       " (12148, 9719),\n",
       " (11628, 5838),\n",
       " (1598, 10607),\n",
       " (2159, 601),\n",
       " (10370, 383),\n",
       " (6154, 6829),\n",
       " (10351, 8062),\n",
       " (1826, 10260),\n",
       " (3010, 993),\n",
       " (2144, 12139),\n",
       " (898, 2893),\n",
       " (3234, 12911),\n",
       " (5801, 4562),\n",
       " (1956, 2580),\n",
       " (5503, 2272),\n",
       " (11693, 9045),\n",
       " (8964, 9451),\n",
       " (9891, 10328),\n",
       " (8815, 3544),\n",
       " (805, 3210),\n",
       " (608, 13358),\n",
       " (8070, 2526),\n",
       " (8112, 4092),\n",
       " (8455, 4147),\n",
       " (9035, 765),\n",
       " (7243, 11726),\n",
       " (4849, 9467),\n",
       " (13131, 9356),\n",
       " (5731, 5531),\n",
       " (391, 4698),\n",
       " (2654, 4206),\n",
       " (7438, 12467),\n",
       " (4690, 2267),\n",
       " (1066, 3411),\n",
       " (1696, 6994),\n",
       " (5799, 13043),\n",
       " (6551, 1941),\n",
       " (2526, 8047),\n",
       " (4641, 7766),\n",
       " (1858, 1554),\n",
       " (424, 11360),\n",
       " (8640, 7661),\n",
       " (5863, 7655),\n",
       " (924, 7477),\n",
       " (6058, 623),\n",
       " (12131, 2834),\n",
       " (3780, 12410),\n",
       " (9874, 1875),\n",
       " (1442, 4057),\n",
       " (3574, 7388),\n",
       " (8072, 3759),\n",
       " (10552, 11720),\n",
       " (8422, 10066),\n",
       " (3382, 8728),\n",
       " (7717, 2655),\n",
       " (4815, 10328),\n",
       " (2144, 7091),\n",
       " (11059, 4539),\n",
       " (9281, 8453),\n",
       " (6545, 8792),\n",
       " (6154, 4238),\n",
       " (1323, 10676),\n",
       " (1035, 10004),\n",
       " (13181, 6574),\n",
       " (6565, 1948),\n",
       " (9920, 5987),\n",
       " (12433, 5715),\n",
       " (11471, 4599),\n",
       " (12789, 10741),\n",
       " (13181, 10035),\n",
       " (10593, 2746),\n",
       " (5641, 8053),\n",
       " (5381, 849),\n",
       " (6978, 3710),\n",
       " (5508, 8722),\n",
       " (8868, 10798),\n",
       " (6029, 2725),\n",
       " (6700, 2776),\n",
       " (12107, 12503),\n",
       " (767, 987),\n",
       " (9550, 865),\n",
       " (7961, 2499),\n",
       " (8650, 2102),\n",
       " (8456, 2499),\n",
       " (579, 3129),\n",
       " (1362, 9625),\n",
       " (536, 316),\n",
       " (6401, 10935),\n",
       " (12943, 3363),\n",
       " (4279, 5116),\n",
       " (2039, 3926),\n",
       " (7171, 4383),\n",
       " (7495, 8906),\n",
       " (4069, 379),\n",
       " (13009, 1367),\n",
       " (2312, 271),\n",
       " (7703, 4325),\n",
       " (9046, 8855),\n",
       " (355, 11030),\n",
       " (5789, 3923),\n",
       " (10312, 10422),\n",
       " (11127, 2429),\n",
       " (11564, 6227),\n",
       " (2058, 946),\n",
       " (12503, 8047),\n",
       " (12182, 11324),\n",
       " (10378, 5757),\n",
       " (2283, 2713),\n",
       " (9645, 11072),\n",
       " (11808, 7356),\n",
       " (3800, 1790),\n",
       " (10414, 10524),\n",
       " (10885, 11274),\n",
       " (10339, 2787),\n",
       " (1672, 4471),\n",
       " (7136, 7641),\n",
       " (6002, 7512),\n",
       " (8005, 11463),\n",
       " (388, 5905),\n",
       " (5661, 11359),\n",
       " (6945, 7428),\n",
       " (1378, 887),\n",
       " (5196, 4031),\n",
       " (3617, 2057),\n",
       " (11628, 656),\n",
       " (11382, 11708),\n",
       " (1858, 13083),\n",
       " (10541, 7125),\n",
       " (7690, 4425),\n",
       " (12899, 4091),\n",
       " (7972, 9319),\n",
       " (9814, 10967),\n",
       " (6604, 13280),\n",
       " (12732, 10749),\n",
       " (13037, 1945),\n",
       " (7703, 5801),\n",
       " (5265, 13218),\n",
       " (9356, 5919),\n",
       " (11628, 4574),\n",
       " (6797, 5013),\n",
       " (8044, 5558),\n",
       " (5776, 3601),\n",
       " (8757, 858),\n",
       " (431, 8760),\n",
       " (11212, 9518),\n",
       " (481, 5750),\n",
       " (11922, 2872),\n",
       " (2470, 11200),\n",
       " (3494, 9175),\n",
       " (6689, 9383),\n",
       " (6254, 5780),\n",
       " (2137, 10741),\n",
       " (9923, 8923),\n",
       " (1793, 9593),\n",
       " (1366, 216),\n",
       " (7791, 10553),\n",
       " (9789, 11006),\n",
       " (9542, 3484),\n",
       " (3970, 10440),\n",
       " (4404, 11508),\n",
       " (9582, 12286),\n",
       " (2057, 11127),\n",
       " (8645, 9785),\n",
       " (5301, 11295),\n",
       " (12950, 6301),\n",
       " (2180, 3363),\n",
       " (13250, 5326),\n",
       " (2966, 10552),\n",
       " (11313, 10556),\n",
       " (6855, 3259),\n",
       " (620, 184),\n",
       " (8757, 9929),\n",
       " (4238, 11375),\n",
       " (13321, 5713),\n",
       " (6447, 9394),\n",
       " (8556, 2781),\n",
       " (8646, 10284),\n",
       " (1797, 4604),\n",
       " (12788, 4795),\n",
       " (9797, 10544),\n",
       " (8842, 1107),\n",
       " (8229, 12564),\n",
       " (9508, 11351),\n",
       " (7814, 10060),\n",
       " (2464, 12584),\n",
       " (1187, 13060),\n",
       " (5415, 10199),\n",
       " (4231, 10697),\n",
       " (9370, 4244),\n",
       " (5614, 6640),\n",
       " (9955, 2550),\n",
       " (8916, 3903),\n",
       " (3765, 6231),\n",
       " (3728, 9501),\n",
       " (9255, 6610),\n",
       " (4516, 4176),\n",
       " (7706, 2795),\n",
       " (10678, 3165),\n",
       " (4422, 1366),\n",
       " (7289, 1071),\n",
       " (2157, 8767),\n",
       " (9292, 1897),\n",
       " (11646, 11981),\n",
       " (1597, 8134),\n",
       " (8801, 1858),\n",
       " (6566, 13353),\n",
       " (99, 835),\n",
       " (5774, 4144),\n",
       " (5614, 8208),\n",
       " (6644, 2261),\n",
       " (10595, 7882),\n",
       " (10426, 5149),\n",
       " (6604, 11353),\n",
       " (8148, 10750),\n",
       " (4492, 6003),\n",
       " (12098, 6009),\n",
       " (8587, 5359),\n",
       " (201, 4728),\n",
       " (6489, 7101),\n",
       " (7493, 1407),\n",
       " (13412, 12787),\n",
       " (11112, 11628),\n",
       " (3119, 2772),\n",
       " (11072, 3182),\n",
       " (6467, 1069),\n",
       " (1858, 5015),\n",
       " (9238, 2468),\n",
       " (2499, 10962),\n",
       " (4541, 6231),\n",
       " (5737, 970),\n",
       " (2962, 9852),\n",
       " (9356, 13214),\n",
       " (1989, 11542),\n",
       " (7444, 3524),\n",
       " (2768, 6008),\n",
       " (6215, 8445),\n",
       " (9299, 2782),\n",
       " (87, 5752),\n",
       " (2343, 13012),\n",
       " (5503, 6620),\n",
       " (7713, 9878),\n",
       " (12487, 10938),\n",
       " (2787, 7789),\n",
       " (1382, 12907),\n",
       " (2866, 12527),\n",
       " (1938, 4539),\n",
       " (10680, 11832),\n",
       " (6467, 4444),\n",
       " (6978, 3257),\n",
       " (12627, 12502),\n",
       " (7560, 4795),\n",
       " (2259, 11284),\n",
       " (7652, 4958),\n",
       " (970, 9791),\n",
       " (9573, 969),\n",
       " (11298, 6588),\n",
       " (7836, 12764),\n",
       " (3044, 890),\n",
       " (977, 11096),\n",
       " (644, 11321),\n",
       " (9546, 12692),\n",
       " (7813, 10971),\n",
       " (7054, 4404),\n",
       " (462, 8948),\n",
       " (10864, 10321),\n",
       " (940, 3348),\n",
       " (2716, 1220),\n",
       " (6880, 10400),\n",
       " (11246, 12723),\n",
       " (11292, 12151),\n",
       " (8015, 13087),\n",
       " (7236, 11309),\n",
       " (2057, 13021),\n",
       " (9644, 4914),\n",
       " (7370, 692),\n",
       " (9667, 3539),\n",
       " (11699, 12278),\n",
       " (5137, 345),\n",
       " (1378, 11739),\n",
       " (3146, 220),\n",
       " (69, 8266),\n",
       " (10386, 9241),\n",
       " (11798, 12310),\n",
       " (11237, 3495),\n",
       " (4870, 5941),\n",
       " (10029, 12272),\n",
       " (8757, 12159),\n",
       " (1589, 5200),\n",
       " (2027, 4335),\n",
       " (96, 11517),\n",
       " (5763, 475),\n",
       " (11955, 11070),\n",
       " (10386, 2966),\n",
       " (1442, 3903),\n",
       " (11982, 3570),\n",
       " (2800, 7958),\n",
       " (2599, 6000),\n",
       " (7449, 462),\n",
       " (5514, 3738),\n",
       " (2725, 8673),\n",
       " (17, 1755),\n",
       " (7550, 8237),\n",
       " (12879, 7099),\n",
       " (6551, 7198),\n",
       " (6154, 13099),\n",
       " (10035, 9308),\n",
       " (10955, 12907),\n",
       " (480, 8916),\n",
       " (13312, 5715),\n",
       " (914, 5326),\n",
       " (7297, 5595),\n",
       " (3919, 9310),\n",
       " (3093, 119),\n",
       " (1994, 10479),\n",
       " (3387, 7998),\n",
       " (10957, 5171),\n",
       " (10993, 2459),\n",
       " (7115, 7373),\n",
       " (4169, 3918),\n",
       " (4416, 11602),\n",
       " (5293, 1808),\n",
       " (1780, 4702),\n",
       " (4256, 4197),\n",
       " (6080, 13092),\n",
       " (9001, 10226),\n",
       " (2300, 6138),\n",
       " (1504, 1576),\n",
       " (8741, 5544),\n",
       " (12772, 11819),\n",
       " (1104, 12646),\n",
       " (3310, 10111),\n",
       " (1792, 1109),\n",
       " (490, 9322),\n",
       " (2909, 10174),\n",
       " (1280, 1401),\n",
       " (11401, 7414),\n",
       " (2272, 11121),\n",
       " (10889, 10621),\n",
       " (4057, 11674),\n",
       " (12202, 7125),\n",
       " (8387, 10620),\n",
       " (10316, 3601),\n",
       " (10190, 2645),\n",
       " (5790, 10687),\n",
       " (7921, 91),\n",
       " (13299, 1620),\n",
       " (8093, 11631),\n",
       " (1858, 8592),\n",
       " (9333, 9433),\n",
       " (6211, 12771),\n",
       " (898, 13353),\n",
       " (2176, 2735),\n",
       " (8781, 4206),\n",
       " (1984, 4975),\n",
       " (6724, 868),\n",
       " (267, 924),\n",
       " (2394, 1500),\n",
       " (10884, 462),\n",
       " (7939, 7829),\n",
       " (4677, 11285),\n",
       " (8982, 2251),\n",
       " (404, 13307),\n",
       " (5350, 2035),\n",
       " (7171, 6296),\n",
       " (6663, 536),\n",
       " (1985, 4580),\n",
       " (5268, 7229),\n",
       " (5614, 7099),\n",
       " (13068, 12965),\n",
       " (1092, 13177),\n",
       " (10466, 9932),\n",
       " (9912, 4215),\n",
       " (11298, 2658),\n",
       " (11467, 6008),\n",
       " (8965, 1949),\n",
       " (12038, 9395),\n",
       " (2406, 1641),\n",
       " (7677, 1565),\n",
       " (3428, 7046),\n",
       " (4387, 3926),\n",
       " (10447, 10004),\n",
       " (8512, 12558),\n",
       " (833, 2094),\n",
       " (5614, 8923),\n",
       " (7458, 3894),\n",
       " (3341, 7410),\n",
       " (3253, 4582),\n",
       " (12576, 4606),\n",
       " (3303, 6251),\n",
       " (971, 8088),\n",
       " (8824, 2687),\n",
       " (12167, 12884),\n",
       " (11499, 1393),\n",
       " (3338, 4260),\n",
       " (2236, 5950),\n",
       " (5685, 2486),\n",
       " (10285, 13177),\n",
       " (7232, 5614),\n",
       " (11845, 8082),\n",
       " (851, 4494),\n",
       " (2693, 947),\n",
       " (3969, 2834),\n",
       " (38, 116),\n",
       " (9356, 1407),\n",
       " (10782, 8721),\n",
       " (9891, 2034),\n",
       " (69, 5685),\n",
       " (10416, 11740),\n",
       " (18, 13151),\n",
       " (11008, 8958),\n",
       " (7029, 2424),\n",
       " (1401, 2429),\n",
       " (3728, 1867),\n",
       " (9501, 2247),\n",
       " (3073, 8269),\n",
       " (6447, 4190),\n",
       " (6333, 9439),\n",
       " (10920, 12149),\n",
       " (2057, 5047),\n",
       " (2057, 12874),\n",
       " (10979, 1779),\n",
       " (10789, 4661),\n",
       " (1680, 6604),\n",
       " (4118, 12222),\n",
       " (5428, 7226),\n",
       " (6914, 5468),\n",
       " (3772, 12368),\n",
       " (9248, 1709),\n",
       " (2258, 475),\n",
       " (9356, 8915),\n",
       " (6317, 4122),\n",
       " (13154, 2999),\n",
       " (2023, 7859),\n",
       " (2800, 8827),\n",
       " (2180, 6390),\n",
       " (8456, 4721),\n",
       " (1442, 5679),\n",
       " (11042, 12975),\n",
       " (1696, 34),\n",
       " (4197, 10696),\n",
       " (3082, 5058),\n",
       " (11127, 6622),\n",
       " (8282, 12245),\n",
       " (11741, 125),\n",
       " (2467, 650),\n",
       " (7543, 12925),\n",
       " (523, 4700),\n",
       " (12316, 6903),\n",
       " (12548, 6363),\n",
       " (11692, 10008),\n",
       " (10447, 3836),\n",
       " (10929, 85),\n",
       " (4323, 2655),\n",
       " (11646, 8721),\n",
       " (5114, 2878),\n",
       " (9330, 2655),\n",
       " (7121, 11995),\n",
       " (13078, 2655),\n",
       " (7712, 2326),\n",
       " (11127, 12094),\n",
       " (10369, 3447),\n",
       " (13336, 8060),\n",
       " (6283, 12229),\n",
       " (1947, 4953),\n",
       " (10989, 4722),\n",
       " (8982, 13311),\n",
       " (1019, 892),\n",
       " (2869, 8888),\n",
       " (10041, 412),\n",
       " (4715, 7664),\n",
       " (8611, 3639),\n",
       " (2938, 10141),\n",
       " (7961, 11187),\n",
       " (7147, 3324),\n",
       " (11249, 4958),\n",
       " (4296, 9801),\n",
       " (11373, 4178),\n",
       " (12862, 1919),\n",
       " (10466, 9208),\n",
       " (9641, 9944),\n",
       " (5062, 11217),\n",
       " (11524, 4028),\n",
       " (321, 4057),\n",
       " (7557, 921),\n",
       " (7173, 7477),\n",
       " (2506, 1914),\n",
       " (9894, 12022),\n",
       " (3126, 12063),\n",
       " (7205, 11236),\n",
       " (1084, 3056),\n",
       " (2039, 12881),\n",
       " (12229, 7527),\n",
       " (3073, 12164),\n",
       " (608, 465),\n",
       " (10764, 12050),\n",
       " (4973, 2428),\n",
       " (1987, 329),\n",
       " (8940, 4305),\n",
       " (1889, 4582),\n",
       " (38, 11085),\n",
       " (7310, 5614),\n",
       " (12000, 1445),\n",
       " (12422, 9524),\n",
       " (5093, 5239),\n",
       " (12260, 171),\n",
       " (1129, 2510),\n",
       " (7760, 11103),\n",
       " (5633, 11127),\n",
       " (10220, 8204),\n",
       " (2712, 3002),\n",
       " (10085, 12888),\n",
       " (5601, 1476),\n",
       " (1680, 13280),\n",
       " (1401, 13339),\n",
       " (2057, 10398),\n",
       " (4713, 1540),\n",
       " (849, 1723),\n",
       " (3970, 8196),\n",
       " (5244, 11480),\n",
       " (1370, 111),\n",
       " (3691, 6225),\n",
       " (1084, 8670),\n",
       " (11143, 9356),\n",
       " (6638, 4979),\n",
       " (11790, 2738),\n",
       " (4256, 8333),\n",
       " (12067, 8916),\n",
       " (7623, 2808),\n",
       " (644, 12300),\n",
       " (6920, 1021),\n",
       " (12878, 4983),\n",
       " (11887, 9402),\n",
       " (6947, 2296),\n",
       " (2339, 10284),\n",
       " (8928, 7124),\n",
       " (9711, 117),\n",
       " (10337, 8750),\n",
       " (6921, 5321),\n",
       " (9255, 12944),\n",
       " (4961, 9788),\n",
       " (12263, 4593),\n",
       " (4238, 6979),\n",
       " (12312, 10903),\n",
       " (5760, 8700),\n",
       " (6458, 7418),\n",
       " (12835, 4395),\n",
       " (1730, 6839),\n",
       " (4498, 10279),\n",
       " (10887, 9534),\n",
       " (10432, 6856),\n",
       " (1797, 3415),\n",
       " (639, 3999),\n",
       " (678, 7881),\n",
       " (7476, 8247),\n",
       " (3853, 11898),\n",
       " (10829, 2267),\n",
       " (10706, 7802),\n",
       " (10314, 1620),\n",
       " (4680, 2108),\n",
       " (6792, 12924),\n",
       " (1921, 4523),\n",
       " (11383, 5848),\n",
       " (9209, 7772),\n",
       " (2548, 1339),\n",
       " (5568, 6012),\n",
       " (3248, 12881),\n",
       " (8140, 4463),\n",
       " (11097, 2655),\n",
       " (2717, 13406),\n",
       " (8247, 8017),\n",
       " (962, 3615),\n",
       " (4880, 3773),\n",
       " (421, 3154),\n",
       " (12041, 2795),\n",
       " (176, 975),\n",
       " (1414, 910),\n",
       " (12375, 1630),\n",
       " (10, 7851),\n",
       " (12353, 4620),\n",
       " (2377, 2383),\n",
       " (4533, 246),\n",
       " (8718, 345),\n",
       " (8749, 4325),\n",
       " (2800, 10519),\n",
       " (12184, 5209),\n",
       " (8928, 561),\n",
       " (3640, 10553),\n",
       " (664, 963),\n",
       " (576, 1695),\n",
       " (5086, 1401),\n",
       " (5275, 9129),\n",
       " (5351, 11240),\n",
       " (2795, 9074),\n",
       " (4238, 13099),\n",
       " (778, 11816),\n",
       " (5632, 545),\n",
       " (12154, 7662),\n",
       " (11042, 4669),\n",
       " (3355, 1339),\n",
       " (13181, 11720),\n",
       " (4, 9032),\n",
       " (4160, 2649),\n",
       " (9215, 2002),\n",
       " (1858, 1094),\n",
       " (10587, 3129),\n",
       " (8928, 5863),\n",
       " (6955, 4206),\n",
       " (4337, 4951),\n",
       " (7490, 5881),\n",
       " (924, 6604),\n",
       " (9368, 4319),\n",
       " (870, 307),\n",
       " (11268, 1437),\n",
       " (10316, 10447),\n",
       " (8798, 5228),\n",
       " (12546, 9372),\n",
       " (12453, 11248),\n",
       " (3457, 4304),\n",
       " (10181, 2247),\n",
       " (10500, 9156),\n",
       " (1576, 7914),\n",
       " (5801, 892),\n",
       " (7589, 10579),\n",
       " (8485, 10350),\n",
       " (3370, 346),\n",
       " (7171, 3768),\n",
       " (4425, 8173),\n",
       " (6070, 10521),\n",
       " (5614, 124),\n",
       " (4835, 11212),\n",
       " (9356, 7886),\n",
       " (644, 12595),\n",
       " (13123, 11225),\n",
       " (5265, 2899),\n",
       " (9667, 5655),\n",
       " (8356, 9006),\n",
       " (6829, 6096),\n",
       " (1383, 9822),\n",
       " (2538, 7630),\n",
       " (7495, 13264),\n",
       " (7703, 10741),\n",
       " (10314, 9142),\n",
       " (8862, 3687),\n",
       " (9929, 11353),\n",
       " (5614, 4918),\n",
       " (8724, 8557),\n",
       " (297, 12013),\n",
       " (9215, 9414),\n",
       " (2057, 11886),\n",
       " (3073, 7568),\n",
       " (2341, 11628),\n",
       " (12784, 11581),\n",
       " (4481, 12145),\n",
       " (11524, 123),\n",
       " (6568, 3849),\n",
       " (842, 9051),\n",
       " (5346, 11942),\n",
       " (13294, 4624),\n",
       " (2466, 6748),\n",
       " (9474, 6559),\n",
       " (10696, 2057),\n",
       " (10437, 441),\n",
       " (10224, 8790),\n",
       " (141, 2257),\n",
       " (9638, 8214),\n",
       " (9865, 11244),\n",
       " (5792, 12919),\n",
       " (2144, 3617),\n",
       " (17, 5071),\n",
       " (9172, 1495),\n",
       " (4363, 6801),\n",
       " (4162, 12307),\n",
       " (7502, 7632),\n",
       " (3744, 12001),\n",
       " (1289, 13007),\n",
       " (2428, 2589),\n",
       " (706, 11624),\n",
       " (9955, 7284),\n",
       " (9417, 4124),\n",
       " (8500, 2272),\n",
       " (2057, 8234),\n",
       " (10956, 4210),\n",
       " (10400, 6961),\n",
       " (5722, 3179),\n",
       " (1589, 7632),\n",
       " (8862, 10181),\n",
       " (6283, 1362),\n",
       " (9154, 4657),\n",
       " (11755, 10352),\n",
       " (3148, 5781),\n",
       " (10697, 12258),\n",
       " (11969, 3597),\n",
       " (7586, 11455),\n",
       " (4430, 2290),\n",
       " (10448, 12702),\n",
       " (4397, 71),\n",
       " (11111, 2608),\n",
       " (1268, 10204),\n",
       " (417, 5468),\n",
       " (1442, 6159),\n",
       " (11561, 5682),\n",
       " (11715, 10041),\n",
       " (5149, 13118),\n",
       " (5647, 13141),\n",
       " (4295, 8664),\n",
       " (9730, 971),\n",
       " (6947, 8839),\n",
       " (3023, 8883),\n",
       " (3566, 12820),\n",
       " (12100, 3179),\n",
       " (8679, 11273),\n",
       " (1793, 1762),\n",
       " (5986, 7728),\n",
       " (6689, 10488),\n",
       " (4444, 9183),\n",
       " (12915, 3580),\n",
       " (8221, 11453),\n",
       " (1889, 9338),\n",
       " (13128, 2251),\n",
       " (6578, 206),\n",
       " (12800, 786),\n",
       " (11694, 10828),\n",
       " (8996, 10550),\n",
       " (7085, 3741),\n",
       " (10920, 3154),\n",
       " (7342, 3828),\n",
       " (143, 1498),\n",
       " (2383, 9944),\n",
       " (9354, 6180),\n",
       " (2925, 238),\n",
       " (742, 2332),\n",
       " (10479, 1662),\n",
       " (12548, 9924),\n",
       " (11428, 6405),\n",
       " (4498, 12229),\n",
       " (5714, 11386),\n",
       " (10035, 2383),\n",
       " (5991, 7870),\n",
       " (7960, 462),\n",
       " (4425, 6366),\n",
       " (12422, 11127),\n",
       " (12601, 2095),\n",
       " (5481, 12127),\n",
       " (11012, 11925),\n",
       " (8246, 4604),\n",
       " (3683, 8282),\n",
       " (2985, 10419),\n",
       " (9648, 13009),\n",
       " (8599, 4275),\n",
       " (9089, 8408),\n",
       " (11365, 6602),\n",
       " (4772, 9606),\n",
       " (10284, 3643),\n",
       " (11012, 5128),\n",
       " (1420, 7661),\n",
       " (3067, 8623),\n",
       " (11298, 10088),\n",
       " (7851, 868),\n",
       " (5791, 3696),\n",
       " (2449, 1909),\n",
       " (7735, 1262),\n",
       " (3848, 10152),\n",
       " (8988, 12878),\n",
       " (11663, 9619),\n",
       " (11752, 11611),\n",
       " (10750, 11544),\n",
       " (10552, 12159),\n",
       " (10, 9727),\n",
       " (5452, 3835),\n",
       " (6026, 7411),\n",
       " (11959, 8311),\n",
       " (11292, 3190),\n",
       " (5265, 12899),\n",
       " (10818, 2040),\n",
       " (10215, 10262),\n",
       " (3632, 7832),\n",
       " (2826, 3363),\n",
       " (8258, 4740),\n",
       " (13371, 10364),\n",
       " (4332, 143),\n",
       " (13412, 1737),\n",
       " (8990, 224),\n",
       " (10948, 6246),\n",
       " (13088, 13146),\n",
       " (1994, 12263),\n",
       " (4183, 5692),\n",
       " (948, 2358),\n",
       " (9287, 890),\n",
       " (7752, 12001),\n",
       " (10541, 12229),\n",
       " (11845, 1368),\n",
       " (12465, 8173),\n",
       " (8295, 8502),\n",
       " (4678, 13018),\n",
       " (5798, 6224),\n",
       " (12590, 11711),\n",
       " (9073, 12701),\n",
       " (12202, 966),\n",
       " (5929, 2064),\n",
       " (10642, 12789),\n",
       " (7632, 13264),\n",
       " (10397, 4295),\n",
       " (950, 9494),\n",
       " (3049, 7511),\n",
       " (2655, 11067),\n",
       " (9156, 588),\n",
       " (1793, 2377),\n",
       " (11050, 8506),\n",
       " (6096, 9944),\n",
       " (522, 6174),\n",
       " (1312, 5421),\n",
       " (5130, 8025),\n",
       " (12416, 6316),\n",
       " (2170, 1407),\n",
       " (4437, 1897),\n",
       " (8512, 8880),\n",
       " (6572, 11953),\n",
       " (7615, 9465),\n",
       " (2860, 4880),\n",
       " (11097, 2805),\n",
       " (3479, 7672),\n",
       " (7708, 2649),\n",
       " (8217, 3772),\n",
       " (3878, 1010),\n",
       " (13037, 8343),\n",
       " (6580, 10493),\n",
       " (6689, 13350),\n",
       " (8258, 7692),\n",
       " (7229, 9944),\n",
       " (820, 4550),\n",
       " (11693, 13054),\n",
       " (12164, 8596),\n",
       " (10638, 3703),\n",
       " (10537, 7756),\n",
       " (8587, 8422),\n",
       " (11151, 10811),\n",
       " (7712, 11867),\n",
       " (8103, 85),\n",
       " (3253, 11508),\n",
       " (9153, 12344),\n",
       " (5123, 9238),\n",
       " (12220, 7645),\n",
       " (7477, 12764),\n",
       " (1367, 1021),\n",
       " (7139, 94),\n",
       " (9666, 3180),\n",
       " (5731, 11248),\n",
       " (5894, 7470),\n",
       " (1671, 5966),\n",
       " (3764, 12951),\n",
       " (12586, 10206),\n",
       " (12862, 1856),\n",
       " ...}"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "event"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
